<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #sp1{
            background: lightblue;
            /*把行级元素变成块级元素*/
            /*display:block;*/
        }

        #sp2{
            background: lightpink;
            /*display: block;*/
        }

        #sp3{
            width: 300px;
            height: 300px;
            /*display: block;*/
            background: lightgoldenrodyellow;
        }
    </style>
</head>
<body>
<h1>行级元素演示案例</h1>
<hr>

<span id="sp1">
    SPAN1
    <div>
        DIV1
    </div>
</span>
<span id="sp2">
    SPAN2
</span>
<span id="sp3">
    SPAN3
</span>

<img src="http://img.simoniu.com/CSS%E7%AE%80%E4%BB%8B02.jpg"/>&nbsp;
<img src="http://img.simoniu.com/html5%E7%AE%80%E4%BB%8B001.jpg"/>&nbsp;
<img style="width:160px;" src="http://img.simoniu.com/java_logo3.jpg"/>
</body>
</html>